﻿namespace NGridDrawer.Partitions
{
    /// <LastUpdate author="Blaise Braye" Date="15/06/2008 17:02"/>
    /// <summary>
    /// Provides the base class for elements of a <see cref="PartitionGrid"/> object.
    /// </summary>
    public abstract class PartitionGridElement
    {
        private readonly PartitionGrid _grid;

        private PartitionGridElement()
        {
        }


        /// <summary>
        /// 	<para>Initializes an instance of the <see cref="PartitionGridElement"/> class.</para>
        /// </summary>
        /// <param name="grid"><see cref="PartitionGrid"/> object associated with this element</param>
        protected PartitionGridElement(PartitionGrid grid)
            : this()
        {
            _grid = grid;
        }

        /// <summary>
        /// Get the <see cref="PartitionGrid"/> object associated with this element
        /// </summary>
        public PartitionGrid Grid
        {
            get { return _grid; }
        }
    }
}